//
//  NextGradeView.m
//  bitcoin
//
//  Created by caiyajun on 2018/5/9.
//  Copyright © 2018年 比特币. All rights reserved.
//

#import "NextGradeView.h"
@interface NextGradeView()

@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UIButton *sureButton;

- (IBAction)backAction:(UIButton *)sender;


- (IBAction)updateAction:(UIButton *)sender;

@end
@implementation NextGradeView

+ (instancetype)xib
{
    return [[NSBundle mainBundle] loadNibNamed:@"NextGradeView" owner:self options:nil][0];
}
- (void)awakeFromNib
{
    [super awakeFromNib];
    
//    self.center = CGPointMake(ScreenWidth / 2, ScreenHeight * 2/5);
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
    view.backgroundColor = [UIColor blackColor];
    view.alpha = 0.75;
    [self addSubview:view];
    self.alpha = 1;
    self.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
    [self addSubview:self.contentView];
    
    [self.sureButton setBackgroundImage:[UIImage imageWithColor:RGBColor(86, 54, 157)] forState:(UIControlStateHighlighted)];
    
}





- (IBAction)backAction:(UIButton *)sender {
    if (self.backActionBlock) {
        self.backActionBlock(sender.tag);
    }
}

- (IBAction)updateAction:(UIButton *)sender {
    if (self.updateActionBlock) {
        self.updateActionBlock(sender.tag);
    }
}
@end
